<template>
  <div class="time-series">
    <div class="title-list">
      <div class="txt"></div>
      <el-divider content-position="center">{{ week }}</el-divider>
    </div>
    <div class="content">
      <div class="show-title">
        <span>时间序列</span>
      </div>
      <TimeSeriesTable></TimeSeriesTable>
    </div>
    <div
      class="content"
      v-permissions="{
        url: ['mem/schedule/serial/insert'],
        hasDisplay: true,
      }"
    >
      <div class="show-title">
        <span>添加序列</span>
      </div>
      <TimeSeriesAdd></TimeSeriesAdd>
    </div>
  </div>
</template>

<script>
import TimeSeriesTable from "./TimeSeriesTable";
import TimeSeriesAdd from "./TimeSeriesAdd";

export default {
  name: "",
  components: { TimeSeriesTable, TimeSeriesAdd },
  props: {},
  data() {
    return {
      week: "",
    };
  },
  computed: {},
  created() {},
  mounted() {
    let _week = this.$route.query.week;
    if (_week == 1) {
      this.week = "周一";
    } else if (_week == 2) {
      this.week = "周二";
    } else if (_week == 3) {
      this.week = "周三";
    } else if (_week == 4) {
      this.week = "周四";
    } else if (_week == 5) {
      this.week = "周五";
    } else if (_week == 6) {
      this.week = "周六";
    } else if (_week == 7) {
      this.week = "周日";
    }
  },
  methods: {},
  watch: {},
};
</script>
<style scoped>
.time-series {
  margin-bottom: 20px;
  border-radius: 4px;
  overflow: hidden;
  color: #303133;
  -webkit-transition: 0.3s;
  transition: 0.3s;
  border: 1px solid #ebeef5;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.content {
  background: #fff;
  border-radius: 10px 10px 0 0;
}
.content:nth-child(2) {
  margin-top: 20px;
}
/*标题*/
.show-title {
  width: 100%;
  height: 40px;
  line-height: 40px;
  position: relative;
  background: #c0dee2;
  padding-left: 15px;
  font-size: 14px;
  margin: 6px 0 0 0;
  border-radius: 12px 12px 0 0;
  font-weight: bold;
}

.show-title::before {
  content: "";
  width: 2px;
  height: 16px;
  background: #676a6d;
  position: absolute;
  top: 12px;
  left: 27px;
}

.show-title span {
  float: left;
  color: #676a6d;
  margin-left: 25px;
}

.time-series >>> .table-wrap {
  border: none;
  box-shadow: none;
}
.time-series >>> .el-divider__text.is-center {
  font-size: 17px;
}
.time-series >>> .el-divider__text {
  background: #c0dee2;
  padding: 15px;
  border-radius: 8px;
}
.title-list {
  background: #fff;
  padding-left: 20px;
  height: 80px;
}
.title-list .txt {
  height: 10px;
}
</style>
